package test.matchers;

import java.util.Collection;

import org.hamcrest.Description;
import org.hamcrest.Factory;
import org.hamcrest.Matcher;
import org.junit.internal.matchers.TypeSafeMatcher;

public class IsNotEmptyCollection extends TypeSafeMatcher<Collection<?>>{

        
        public void describeTo(Description discription) {
                discription.appendText("empty");
        }

        @Override
        public boolean matchesSafely(Collection<?> collection) {
                return !(collection.isEmpty());
        }
        
        @Factory
        public static Matcher<Collection<?>> isNotEmpty() {
                return new IsNotEmptyCollection();
        }

}
